package com.qzsoft.system.modules.permission.index.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.system.modules.permission.index.dto.FlowDTO;
import com.qzsoft.system.modules.permission.index.dto.MyProcessInstanceDTO;
import com.qzsoft.system.modules.permission.index.dto.SysScheduleDTO;
import com.qzsoft.system.repository.sys.entity.SysScheduleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IndexMapper {

    IPage<FlowDTO> selectFlowList(IPage<FlowDTO> page, @Param("ew") Wrapper<FlowDTO> queryWrapper);

    List<FlowDTO> selectFlowList(@Param("ew") Wrapper<FlowDTO> queryWrapper);

    int selectFlowListCnt(@Param("ew") Wrapper<FlowDTO> queryWrapper);

    List<MyProcessInstanceDTO> selectCreatedListByUserId(@Param("ew") Wrapper<MyProcessInstanceDTO> queryWrapper);

    List<MyProcessInstanceDTO> selectFinishedTasks(@Param("ew") Wrapper<MyProcessInstanceDTO> queryWrapper);

    List<MyProcessInstanceDTO> selectCarbonCopyListByUserId(@Param("ew") Wrapper<MyProcessInstanceDTO> queryWrapper);

    List<SysScheduleDTO> selectScheduleList(@Param("ew") Wrapper<SysScheduleDTO> queryWrapper);

    void saveSchedule(SysScheduleEntity entity);
}
